package com.ruoyi.controller;

import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.service.DemoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import java.util.Map;

/**
 * 城市管理
 * 2024-10-24
 */
@RestController
@RequestMapping("/hotel/city")
public class CityController extends BaseController {

    @Autowired
    DemoService demoService;

    /**
     * 关联物理房型时城市下拉框
     * @param map
     * @return
     */
    @GetMapping("/getCity")
    public AjaxResult getCity(@RequestParam Map map) {
        return success(demoService.getCity());
    }

    /**
     * 同步本地数据库城市
     */
    @GetMapping("/synchronizationCity")
    public void synchronizationCity(){
        demoService.synchronizationCity();
    }
}
